home *** CD-ROM | disk | FTP | other *** search
- Path: magnet.at!nuucpgw!schmickl
- From: schmickl@magnet.at (Thomas M. Schmickl)
- Reply-To: schmickl@magnet.at
- Newsgroups: comp.lang.c++
- Distribution: world
- Subject: Window-Movements
- Date: 04 Mar 1996 14:21:18 GMT
- Message-ID: <3378249726.3026075@magnet.at>
- Organization: magnet Online Service
-
- Are there any Hardcore-Windows-Gurus out there ???
-
- Is it possible to move a window that has
- no border (Borderstyle:=bsNone) and now
- Title-bar without flickering.
-
- On a window with titlebar, WINDOWS makes it by itself
- and moves only a thin border-Frame and moves
- the window to the new place if you lift the
- mousebutton up again.
- But for this, you have to hav a title bar.
-
- I tried it this way, but it was not stisfying, because
- of too much flickering:(this Code is Pascal, but a solution in C++ would help
- too!!!)
-
- Form.MouseDown:
- XDown:=True;
-
- Form.MouseMove:
- if Xdown=true then
- SetWindowPos(Self.handle,HWND_TOP,x,y,self.width,self.height,SWP_DRAWFRAME);
-
- Form.MouseUp:
- XDown:=False;
-
- I used the API-Routine because I thought the use of the
- flag SWP_DRAWFRAME would cause Windows just to move the
- normal moving-frame, but it was no difference what flag
- I used there (SWP_HIDEWINDOW,SWP_NOZORDER...) it always
- was the same result:
- The whole window was moved and redrawn,
- what caused the flicker.
-
- I 've seen many programmes that are having no Borders
- and no Titlebar (for ex. all Toolbars in MS_OFFICE),
- that can be moved like normal windows, so there must
- be a solution for this.
-
- I think it's just an API-Procedure, that causes a window
- to change to the moving-conditions, but I don't know how.
-
- Answer please to
- SCHMICKL@magnet.at
-